﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
namespace Html1
{
    /// <summary>
    /// Summary description for PostionSave
    /// </summary>
    public class PostionSave : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //context.Response.Write("Hello World");
            string cnnString = "Data Source=shni548;DataBase=PIPC_Production;UID=sa;PWD=password_1;Connection Reset=FALSE;Connect Timeout=120";
            SqlConnection cnn = new SqlConnection(cnnString);
            if (context.Request.Form.Count > 0)
            {
                string queryString = "update Position  set GroupInfokey='" + context.Request.Form[0]+ "'";
                SqlCommand command = new SqlCommand(queryString, cnn);
                cnn.Open();
                command.ExecuteNonQuery();
                cnn.Close();
            }

        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}